package com.fingerchar.api.web;

import com.fingerchar.api.service.FcNftItemsService;
import com.fingerchar.api.service.FcUserService;
import com.fingerchar.api.service.NftTransService;
import com.fingerchar.core.base.controller.BaseController;
import com.fingerchar.core.constant.SysConfConstant;
import com.fingerchar.core.util.ResponseUtil;
import com.fingerchar.db.domain.FcUser;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;

/**
 * @author tangzf
 * @date 2022/9/8
 */
@RestController
@RequestMapping(SysConfConstant.URL_PREFIX + "/trans")
public class TtNftTransController extends BaseController {

    @Resource
    private FcUserService fcUserService;
    @Resource
    private FcNftItemsService fcNftItemsService;
    @Resource
    private NftTransService nftTransService;

    /**
     * 购买前校验
     *
     * @param nftAddress 购买的nft地址
     * @return
     */
    @PostMapping("/check")
    public Object check(String nftAddress, String nftTokenId) {

        String address = getUserAddress();
        return nftTransService.check(address, nftAddress, nftTokenId);
    }

    @PostMapping("/trans")
    public Object trans(){


        return null;
    }

}
